package com.excel.enums;

import lombok.Getter;
import java.util.Arrays;
import java.util.Objects;

/**
 * @ClassName ImportTypeEnum
 **/
@Getter
public enum ImportTypeEnum {

    /**
     * 权限管理模块导入
     */
    USER_AUTH("user_auth", "权限管理模块导入", "权限管理模块导入"),
    DIMENSION_IMPORT("user_auth", "权限管理模块导入", "权限管理模块导入"),
    ;


    private final String templateCode;
    private final String instructions;
    private final String checkFileSheetName;

    ImportTypeEnum(String templateCode, String instructions, String checkFileSheetName) {
        this.templateCode = templateCode;
        this.instructions = instructions;
        this.checkFileSheetName = checkFileSheetName;
    }

    public static ImportTypeEnum findEnumByType(String name) {
        return Arrays.stream(ImportTypeEnum.values())
                .filter(importTypeEnum -> Objects.equals(importTypeEnum.name(), name))
                .findAny()
                .orElse(null);
    }

}
